/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class AirConditionerController {
    static categoryCode = '010030046';

    static categoryName = '空调控制器';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return AirConditionerController.categoryCode;
    }

    get categoryName() {
        return AirConditionerController.categoryName;
    }

    getCurrentTemperature(params) {
        return command({
            method: 'getCurrentTemperature',
            methodId: 'pGoxHJCm',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getMode(params) {
        return command({
            method: 'getMode',
            methodId: 'pgh0mcTU',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pDrhF8Dw',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTemperature(params) {
        return command({
            method: 'getTemperature',
            methodId: 'p1vFj2eP',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWindSpeed(params) {
        return command({
            method: 'getWindSpeed',
            methodId: 'phEqKYjC',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setMode(params) {
        return command({
            method: 'setMode',
            methodId: 'pUPQ8Vql',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'ppAXISzK',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setTemperature(params) {
        return command({
            method: 'setTemperature',
            methodId: 'peH3nLKM',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setWindSpeed(params) {
        return command({
            method: 'setWindSpeed',
            methodId: 'pZgRTTS5',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default AirConditionerController;
